﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/BackEndFashion.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Fashion.Models.ProductPropertyName>>" %>
<%@ Import Namespace="A" %>
<%@ Import Namespace="Fashion.Common.Const" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th>Id</th>
            <th>Name</th>
            <th>Unit</th>
            <th>IsValueStatic</th>
            <th>View Value Static</th>
            <th>IsMultiValue</th>
            <th></th>
        </tr>
        <%foreach (var propertyName in Model){ %>
            <tr>
                <td><%=propertyName.Id %></td>
                <td><%=propertyName.Name %></td>
                <td><%=propertyName.Unit %></td>
                <td align="center"><%=propertyName.IsValueStatic.DisplayIconActive()%></td>
                <td align="center"><%=propertyName.IsValueStatic?Html.ActionLink("View","AllValueStatic",new{propertyId=propertyName.Id}).ToString():"" %></td>
                <td align="center"><%=propertyName.IsMultiValue.DisplayIconActive()%></td>
                <td>
                    <%=Html.ActionLink(ParameterTemplate.Image, "Update", new {id=propertyName.Id}).DisplayActionLinkByImage(HtmlCode.ImgIconEdit)%>
                    <%=Html.ActionLink(ParameterTemplate.Image, "Delete", new { id = propertyName.Id }, new { onclick = "return confirm('Are you sure you wish to delete this record?');" }).DisplayActionLinkByImage(HtmlCode.ImgIconDelete)%>
                </td>
            </tr>
        <%} %>
        <tr>
            <td colspan="10" align="right">
                <%=Html.ActionLink(ParameterTemplate.Image,"Create").DisplayActionLinkByImage(HtmlCode.ImgIconAddNew) %>
            </td>
        </tr>
    </table>
</asp:Content>
